# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=dua
pkgver=2.17.8
pkgrel=0
pkgdesc="Tool to conveniently learn about the usage of disk space"
url="https://github.com/Byron/dua-cli"
license="MIT"
arch="all !s390x !riscv64" # blocked by rust/cargo
makedepends="cargo"
source="https://github.com/Byron/dua-cli/archive/v$pkgver/dua-$pkgver.tar.gz"
builddir="$srcdir/dua-cli-$pkgver"

prepare() {
	default_prepare

	cargo fetch --locked
}

build() {
	cargo build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/dua -t "$pkgdir"/usr/bin
}

sha512sums="
e5a464aa4d7c20841a4ad0c1712413f4f1240bf61178228ffbf2703d14380f43686078fdf2201c762cf285f4cd32ccb147ea3e4cc0dc1976a74cf28bbda2a67f  dua-2.17.8.tar.gz
"
